import { NestFactory } from '@nestjs/core';
import { CommonServiceModule } from './common-service.module';
import { MicroserviceOptions, Transport } from '@nestjs/microservices'

async function bootstrap() {
  // const app = await NestFactory.create(CommonServiceModule);
  // await app.listen(3000);
  const app = await NestFactory.createMicroservice<MicroserviceOptions>(CommonServiceModule, {
    transport: Transport.TCP,
    options: {
      host: '0.0.0.0',
      port: 8888
    }
  })
  await app.listen()
}
bootstrap();
